<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Ragnar
 * Date: 03.07.12
 * Time: 20:50
 * To change this template use File | Settings | File Templates.
 */

if (isset($_POST['submit']))
{
    require_once '../system/helpers/Uploader.php';


    $file = new File($_FILES['upl1']['name'], $_FILES['upl1']['tmp_name']);
    $uploader = new Uploader('../system/helpers/', array($file));
    $uploader->setValidExtensions(array('png'));
    $uploader->upload();

    if ($uploader->hasErrors())
    {
        var_dump($uploader->getErrors());
    }
}
?>

<form action="" method="POST" enctype="multipart/form-data">
    <input name="upl1" type="file" />
    <input name="submit" type="submit" value="Upload" />
</form>

